<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>通过prop关联组件属性</title>
    <script src="../lib/vue-2.6.7.js"></script>
    <style type="text/css">
    </style>
</head>
<body>
<div id="app">
    <blog-post title="My journey with Vue" ></blog-post>
    <blog-post title="Blogging with Vue"></blog-post>
    <blog-post title="Why Vue is so fun"></blog-post>
</div>
<script>
    Vue.component('blog-post', {
        props: ['title'],
        template: '<h3>{{ title }}</h3>'
    })
    const vm = new Vue({
        el: "#app",
        data: {
            msg:'hello'
        }
    })
</script>
</body>
</html>